package com.github.kotvertolet.youtubejextractor.models.newModels;

import com.google.gson.annotations.SerializedName;
import ohos.utils.Parcel;
import ohos.utils.Sequenceable;

import java.io.Serializable;

/**
 * 类功能描述(类上)
 *
 * @author AnBetter
 * @since 2021-04-14
 */
public class ActionsItem implements Sequenceable, Serializable {
    @SerializedName("openPopupAction")
    private OpenPopupAction openPopupAction;

    @SerializedName("clickTrackingParams")
    private String clickTrackingParams;

    public static final Sequenceable.Producer<ActionsItem> CREATOR = new Producer<ActionsItem>() {
        @Override
        public ActionsItem createFromParcel(Parcel parcel) {
            // Initialize an instance first, then do customized unmarshlling.
            ActionsItem actionsItem = new ActionsItem();
            actionsItem.unmarshalling(parcel);
            return actionsItem;
        }
    };


    @Override
    public boolean marshalling(Parcel parcel) {
        parcel.writeSequenceable(this.openPopupAction);
        parcel.writeString(this.clickTrackingParams);
        return true;
    }

    @Override
    public boolean unmarshalling(Parcel parcel) {
        parcel.readSequenceable(this.openPopupAction);
        this.clickTrackingParams=parcel.readString();
        return true;
    }

    @Override
    public String toString() {
        return "ActionsItem{" +
                "openPopupAction = '" + openPopupAction + '\'' +
                ",clickTrackingParams = '" + clickTrackingParams + '\'' +
                "}";
    }


    public OpenPopupAction getOpenPopupAction() {
        return openPopupAction;
    }

    public void setOpenPopupAction(OpenPopupAction openPopupAction) {
        this.openPopupAction = openPopupAction;
    }

    public String getClickTrackingParams() {
        return clickTrackingParams;
    }

    public void setClickTrackingParams(String clickTrackingParams) {
        this.clickTrackingParams = clickTrackingParams;
    }
}
